<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Select Statement</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta name="generator" content="Doc-O-Matic" />
    <meta http-equiv="Content-Style-Type" content="text/css" />
    <link rel="STYLESHEET" href="default.css" type="text/css" />

<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', 'Select_Statement.html');" onmousedown="onBodyMouseDown();">

<!-- Begin Popups -->

<!-- End Popups -->

<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element94">
<em>You are here:</em> Using General SQL Parser &gt; <a href="Select_Statement.html" target="topic">Select Statement</a></div>
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="50%">
<div class="Element2">
<a href="contents.html" target="tocidx"><img src="btn_globals_contents_midblue.gif" border="0" alt="Contents" title="Contents" onmouseover="switchImage(this, 'btn_globals_contents_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_globals_contents_midblue.gif');"></a><a href="idx.html" target="tocidx"><img src="btn_globals_index_midblue.gif" border="0" alt="Index" title="Index" onmouseover="switchImage(this, 'btn_globals_index_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_globals_index_midblue.gif');"></a><a href="index.html" target="topic"><img src="btn_globals_home_midblue.gif" border="0" alt="Home" title="Home" onmouseover="switchImage(this, 'btn_globals_home_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_globals_home_midblue.gif');"></a></div>
</td><td width="50%">
<div class="Element90">
<a href="How_to_refactor_sql.html" target="topic"><img src="btn_prev_midblue.gif" border="0" alt="Previous" title="Previous" onmouseover="switchImage(this, 'btn_prev_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_prev_midblue.gif');"></a><img src="btn_up_d.gif" border="0" alt="Up" title="Up"><a href="From_clause.html" target="topic"><img src="btn_next_midblue.gif" border="0" alt="Next" title="Next" onmouseover="switchImage(this, 'btn_next_midblue_hover.gif');" onmouseout="switchImage(this, 'btn_next_midblue.gif');"></a></div>
</td></tr></table><div class="Element5">
Select Statement</div>
</div>
</div>

<!-- End Page Header -->

<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">

<!-- Begin Page Content -->
<div class="Element58">
<a name="Description"></a><div class="Element11">
<div class="Element10">
<p class="Element10">
Select statement includes following topics, any un-documented clauses in select statement will be added later.</p></div>
</div>
<a name="Topics"></a><div class="Section1000030">
Topics</div>
<div class="Element10030">
<div class="Section30">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table0">
<tr>
<td class="Element200" valign="top" width="35%">
<div class="Element201">
Topic&nbsp;</div></td><td class="Element204" valign="top" width="65%">
<div class="Element205">
Description&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="35%">
<div class="Element203">
<a href="From_clause.html" target="topic">From clause</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
From clause in select statement was represented by JoinTables which is type of <a href="TLzJoinList.html" target="topic">TLzJoinList</a>.<br>For more detailed information about join table in from clause, you can check <a href="How_to_use_join_table.html" target="topic">&quot;how to use join table&quot;</a>.<br>JoinTables represents from clause in a hierarchy structure which includes all information in from clause such as join table, join type and join condition, if you only need to fetch table information in from clause, you can use tables instead which is type of <a href="TLzTableList.html" target="topic">TLzTableList</a>.<br><br>Here are some key properties of <a href="TLzTable.html" target="topic">TLzTable</a>:</p>
<ol class="Element630">
<li value="1" class="Element600">TableName, fetch table name or set table name to new value by... <a href="From_clause.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="35%">
<div class="Element203">
<a href="Select_list.html" target="topic">Select list</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Select list in select statement was represented by Fields which is type of <a href="TLzFieldList.html" target="topic">TLzFieldList</a>.<br>You can use SelectClauseText to fetch or set whole string value of select list, or iterate<br>Fields to handle each field separately.<br><br>Here are some key properties of <a href="TLzField.html" target="topic">TLzField</a>:<br><br>FieldType which is type of TLzFieldType
<ul class="Element631">
<li class="Element601">lftColumn: it represents a column information in create table statement. and following properties are valid only FieldType is lftColumn
<ol class="Element632">
<li value="1" class="Element602">ColumnName</li>
<li value="2" class="Element602">ComputedColumnExpr</li>
<li value="3" class="Element602">FieldDataType</li>
<li value="4" class="Element602">ColumnConstraints</li>
</ol></li>
<li class="Element601">lftAttr, check FieldAttr for field information</li>
<li class="Element601">lftExpression, field is an expression, check FieldExpr for detailed information.</li>
<li class="Element601">lftSubquery, field is a subquery, check subquery for more.</li>
</ul><br>You... <a href="Select_list.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="35%">
<div class="Element203">
<a href="Where_clause.html" target="topic">Where clause</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Where clause in select statement was represented by 2 properties:<br>
<ol class="Element631">
<li value="1" class="Element601">WhereClauseText, this is the string representation, you can fetch or set where clause directly by using this property.</li>
<li value="2" class="Element601">WhereClause, which is type of <a href="TLzCustomExpression.html" target="topic">TLzCustomExpression</a>, this property includes detailed information about where clause. Please check <a href="How_to_use_expression.html" target="topic">&quot;How to use expression&quot;</a> for more.</li>
</ol><br><br>You can check following demos shipped together with this component to find out more information about how to work with expression
<ol class="Element631">
<li value="1" class="Element601">visitexpression</li>
</ol>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="35%">
<div class="Element203">
<a href="Group_by_clause.html" target="topic">Group by clause</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Group by clause in select statement was represented by 2 properties:<br>
<ol class="Element631">
<li value="1" class="Element601">GroupbyClauseText,this is the string representation, you can fetch or set group by clause directly by using this property.</li>
</ol><br>Text in GroupbyClauseText includes group by keyword, so if you fetch value from GroupbyClauseText, you can see something like this: group by f1,f2, but not value like this: f1,f2.<br>If you want to append new field value, then do something like this:<br>GroupbyClauseText = GroupbyClauseText + &quot;,f3&quot;<br><br>Or set new value of GroupbyClauseText,<br>GroupbyClauseText = &quot;group by f3&quot;;<br>
<ol class="Element631">
<li value="2" class="Element601">GroupbyClause, which is type of TLzGroupBy,and represents detailed information about group by clause.... <a href="Group_by_clause.html" target="topic">more</a>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="35%">
<div class="Element203">
<a href="Having_clause.html" target="topic">Having clause</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Having clause in select statement was represented by 2 properties:<br>
<ol class="Element632">
<li value="1" class="Element602">HavingClauseText, this is the string representation, you can fetch or set having clause directly by using this property.</li>
<li value="2" class="Element602">HavingClause, which is type of <a href="TLzCustomExpression.html" target="topic">TLzCustomExpression</a>, this property includes detailed information about having clause. Please check <a href="How_to_use_expression.html" target="topic">&quot;How to use expression&quot;</a> for more.</li>
</ol><br>You can check following demos shipped together with this component to find out more information about how to work with expression
<ol class="Element632">
<li value="1" class="Element602">visitexpression</li>
</ol>&nbsp;</div></td></tr><tr>
<td class="Element202" valign="top" width="35%">
<div class="Element203">
<a href="Order_by_clause.html" target="topic">Order by clause</a>&nbsp;</div></td><td class="Element206" valign="top" width="65%">
<div class="Element207">
Order by clause in select statement was represented by 2 properties:<br>
<ol class="Element632">
<li value="1" class="Element602">SortClauseText, this is the string representation, you can fetch or set order by clause directly by using this property.</li>
<li value="2" class="Element602">SortClause, which is type of TLzOrderbyList, and represents detailed information about order by clause.</li>
</ol>Items in TLzOrderbyList is type of TLzOrderBy which represents each field in order by list.<br>there are 2 kinds of field that can be represents by TLzOrderBy, use SortItemType which is type of TLzSortItemType to determine type of field.
<ul class="Element632">
<li class="Element602">sitExpression, use SortExpr which is type of <a href="TLzCustomExpression.html" target="topic">TLzCustomExpression</a> to represent field.</li>
<li class="Element602">sitSubquery, use sortSubquery which is type... <a href="Order_by_clause.html" target="topic">more</a>&nbsp;</div></td></tr></table></div></div>
</div>
</div>
</div>
<!-- End Page Content -->

<!-- Begin Page Footer -->
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="100%">
<div class="Element3">
Gudu software http://www.sqlparser.com</div>
</td></tr><tr><td width="100%">
<div class="Element97">
Send <a href="#" onclick="sendFeedback('info@sqlparser.com', 'Documentation Feedback', 'Project: General SQL Parser Help file%0ATopic ID: Select Statement%0ATitle: Select Statement');">comments</a> about this topic.</div>
</td></tr></table></div>

<!-- End Page Footer -->
</div>
</div>

<!-- End Client Area -->
</body></html>